<?php

/**
 * Rating form base class.
 *
 * @package    FinalsClub
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseRatingForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'      => new sfWidgetFormInputHidden(),
      'value'   => new sfWidgetFormInput(),
      'type_id' => new sfWidgetFormInput(),
      'type'    => new sfWidgetFormInput(),
      'user_id' => new sfWidgetFormPropelChoice(array('model' => 'User', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'      => new sfValidatorPropelChoice(array('model' => 'Rating', 'column' => 'id', 'required' => false)),
      'value'   => new sfValidatorInteger(),
      'type_id' => new sfValidatorInteger(),
      'type'    => new sfValidatorString(array('max_length' => 60)),
      'user_id' => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('rating[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Rating';
  }


}
